# README File to Replicate "Micro and Macro Effects of UI Policies: Evidence from Missouri"

## Overview

The code in this replication package constructs the analysis file from the five data sources (BLS, 2015, QWI, 2020, Klarner 2013, and MIT, 2017, Hagedorn et al. 2013, UI Trsut 2010) using Stata. One main files runs all of the code to generate all of the figures and tables in the paper and online appendix. Running the main analysis takes approximately 5 minutes. Data on vacancies from the HWOL (2016) is confidential and cannot be made publicly available.

## Data Availability and Provenance Statements

### Statement about Rights

- [X] I certify that the author(s) of the manuscript have legitimate access to and permission to use the data used in this manuscript. 
- [X] I certify that the author(s) of the manuscript have documented permission to redistribute/publish the data contained within this replication package. 


### Summary of Availability

- [ ] All data **are** publicly available.
- [X] Some data **cannot be made** publicly available.
- [ ] **No data can be made** publicly available.

- [X] Confidential data used in this paper and not provided as part of the public replication package will be preserved for 20 years after publication. 

### Details on each Data Source

Data provided as part of the replication kit:
Local Area Unemployment Statistics of the Bureau of Labor Statistics (LAUS, 2015)
Quarterly Workforce Indicators of the Census Bureau (QWI, 2020)
UI Trust Fund Data (UI Trust, 2010)
Data on weeks of unemployment insurance available by state (Hagedorn et al, 2013)

Data that cannot be provided due to confidentiality:
Help Wanted Online micro data provided by the Conference Board (https://www.conference-board.org/topics/help-wanted-online). For information about how to access the data please contact Jonathan Liu, +1 732.991.1754, JLiu@tcb.org



## Dataset list

The data is made available in the repository in the following files:

"synth_ready_quarterly_SAtightness.dta": Primary dataset at state-year-quarter level with key labor market variables including unemployment, hires, vacancies, covariates, and treatment indicators. Key variables were seasonally adjusted as ratios. All variables containing vacancies are suppressed for data privacy purposes.

"synth_ready_quarterly.dta": Primary dataset at state-year-quarter level with key labor market variables including unemployment, hires, vacancies, covariates, and treatment indicators. Hires, vacancies and unemployment were seasonally adjusted separately. All variables containing vacancies are suppressed for data privacy purposes.

"FullFinal_AllYears-Daily.dta": dataset at the state-year-month-day level recording the maximum potential duration of UI benefits in weeks for each state

 "ui_trust_fund.dta": dataset recording states with positive amounts of debt in their UI trust fund as of August 27, 2010, including variable with amount of debt at that time (millions USD).

"2008_presidential_election_voteshare.dta": dataset recording Democratic and Republican presidential election vote share by state and an indicator variable for whether a state’s Democratic vote share margin was within 20 points (+/- 10) of Missouri’s margin.

"state_leg_control_KMM.dta": state-level dataset with FIPS code and indicator for whether Republicans controlled at least one chamber of the legislature (House or Senate) in 2011, as was the case in Missouri. Derived from  Klarner, Carl, 2013, “State Partisan Balance Data, 1937-2011”, https://doi.org/10.7910/DVN/LZHMG3, Harvard Dataverse, V1.

"peak_UR_dates_44states.dta": dataset lists the peak unemployment rate month for each control state during the Great Recession. Variables include the state abbreviation, the year-month of the peak (earliest month chosen if ties), and an indicator for whether the peak occurred within +/- two months of Missouri’s peak. Data are seasonally adjusted and sourced from FRED.

"ue_flows_by_state_cps_sa.dta": Dataset includes state-level seasonally adjusted labor market flows between three labor market states (employment, unemployment, not in labor force) from CPS from 1976 to 2018. Job finding rate (UE/U) and job separation rate (EU/E) are constructed from stocks and flows.

"f_rate_state_cps_sa_shimeradj.dta": Dataset at state-level which takes the CPS job finding rate from ue_flows_by_state_cps_sa.dta and applies Shimer (2012) time-aggregation adjustment.

"s_rate_state_cps_sa_shimeradj.dta": Dataset at state-level which takes the CPS separation rate from ue_flows_by_state_cps_sa.dta and applies Shimer (2012) time-aggregation adjustment.




## Computational requirements


### Software Requirements

- [X] The replication package contains one or more programs to install all dependencies and set up the necessary directory structure.

- Stata (code was last run with version 17)
  - the program "`config_stata.do`" will install all dependencies locally, and should be run once. Packages necessary to install are: reghdfe ftools coefplot honestdid


### Controlled Randomness

- [ ] Random seed is set at line 17 of program front_end_euctransitions.m
- [X] No Pseudo random generator is used in the analysis described here.

### Memory, Runtime, Storage Requirements

The replication kit takes about 5 minutes to run on an 2023 M2 Max Macbook Pro. 

#### Summary

Approximate time needed to reproduce the analyses on a standard (CURRENT YEAR) desktop machine:

- [ ] <10 minutes
- [X] 10-60 minutes
- [ ] 1-2 hours
- [ ] 2-8 hours
- [ ] 8-24 hours
- [ ] 1-3 days
- [ ] 3-14 days
- [ ] > 14 days

Approximate storage space needed:

- [ ] < 25 MBytes
- [ ] 25 MB - 250 MB
- [X] 250 MB - 2 GB
- [ ] 2 GB - 25 GB
- [ ] 25 GB - 250 GB
- [ ] > 250 GB

- [ ] Not feasible to run on a desktop machine, as described below.

#### Details

The code was last run on a 2023 MacBook Pro Lapotop M2 Max with 64 GB of RAM and 390 GB of storage space. 


## Description of programs/code

- Programs in output.do perform all of the empirical analysis.

The code is licensed under a MIT license. See `LICENSE` for details.

## Instructions to Replicators

- The program output.do defines all of the functions the generate each of the tables and figures in the paper and online appendix. The code is currently only set to run the functions that generate the results using publicly available data (since the code would crash when trying to run functions using HWOL data). If a replicator gains access to the HWOL data, they simply need to uncomment the commented out functions on lines 3066-3078 of output.do


## List of tables and programs


The provided code reproduces:

- [X] All numbers provided in text in the paper
- [X] All tables and figures in the paper
- [ ] Selected tables and figures in the paper, as explained and justified below.

Note that the code provided generates all numbers, tables, and figures in the paper. However, the data provided do not include the HWOL data. Thus in order to reproduce the tables one needs to get access to that data (through the process described above). The publicly available data provided in this replication kit will generate:

        Table 1
        Table 5
        Figure 1a
        Figure 3a
        Figure A6
        Figure A11
        Figure A12 
        Figure A13 
        Figure A14 (only the lines for H and U)
        Figure A16
        Figure B1

## References

Blouin, Amy, and Tom Kruckemeyer, "State Unemployment Insurance Trust Fund Faces Major Deficit," 2010 https://www.mobudget.org/files/UI%20Trust%20Fund%20Faces%20Deficit%20August%202010.pdf

Hagedorn, Marcus, Fatih Karahan, Iourii Manovskii, and Kurt Mitman. Unemployment benefits and unemployment in the great recession: the role of macro effects. No. w19499. National Bureau of Economic Research, 2013.

Klarner, Carl, 2013, "State Partisan Balance Data, 1937 - 2011", https://doi.org/10.7910/DVN/LZHMG3, Harvard Dataverse, V1

Bureau of Labor Statistics. 2007Q1–2013Q1. “Local Area Unemployment Statistics: All U.S. States, Unemployment, Employment and Labor Force, Seasonally Adjusted, 2015 Revision.” United States Department of Labor. https://download.bls.gov/pub/time.series/la/ (accessed 28 January 2015)

MIT Election Data and Science Lab, 2017, "U.S. President 1976–2020", https://doi.org/10.7910/DVN/42MVDX, Harvard Dataverse, V8, UNF:6:F0opd1IRbeYI9QyVfzglUw== [fileUNF]

U.S. Census Bureau. (2020). Quarterly Workforce Indicators: New Hires and Stable New Hires, All states, 2010Q1-2012Q3. Retrieved December 7, 2020, from https://lehd.ces.census.gov/data/
